#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the version 3 of the GNU Lesser General Public License
#   as published by the Free Software Foundation.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU Lesser General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# Copyright (c) NEC Deutschland GmbH, NEC HPC Europe
#
# $Id$
from mon_hierarchy import Hierarchy

__all__ = ["MetricStore"]


class MetricStore():
    def __init__( self ):
        pass

    def _flattenGroupPath( self, group_path ):
        if group_path == Hierarchy.ROOT_PATH:
            out = Hierarchy.ROOT_NAME
        else:
            out = "_".join( group_path.split( "/" )[1:] )
        return "grpdata_" + out

    def addMetric( self, metric ):
        return None

    def clearMetric( self, host_name, metric_name ):
        return None

    def getHostNames( self ):
        return []

    def getLastMetricsByHostName( self, host_name ):
        return None

    def getLastMetricByMetricName( self, host_name, metric_name ):
        return None

    def getMetricNames( self, host_name ):
        return None

    def getRecordsByMetricName( self, host_name, metric_name, start_s=0, end_s=0, nsteps=0, step_s=0 ):
        return None

    def getSummary( self, path ):
        return None

    def getTimeSeriesType( self, host_name, metric_name ):
        return None
